package com.ht.medicaltreatment.view

import android.content.Context
import com.ht.medicaltreatment.R
import kotlinx.android.synthetic.main.dialog_log_delete_layout.*

class TaskDeleteDialog(context: Context):BaseDialog(context,300f,280f) {
    override fun getLayoutRes() = R.layout.dialog_log_delete_layout
    fun showDialog(content:String = "确认要删除这条数据吗？",onDelete:()->Unit){
        tvTitle.setText(content)
        btnNegative.setOnClickListener { dismiss() }
        btnPositive.setOnClickListener {
            dismiss()
            onDelete()
        }
        show()
    }

}